<%@ page language="java"
         import="cn.com.wxd.common.PageInfo,cn.com.wxd.util.RequestUtil"
         pageEncoding="utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    PageInfo pageInfo = (PageInfo) request.getAttribute("page");
    String id = RequestUtil.getParameter(request, "caid");
    String ajaxFunctionName = RequestUtil.getParameter(request, "ajaxFunction");
%>

<div>
    <p style="color:cadetblue;text-align: center;font-size:12px">第<span style="color:red"><c:out
            value="page.pageIndex"/>
		</span>页（共<span style="color:red"><c:out value="page.pageCount"/>
		</span>页）
    </p>
    <p style="font-size:10px;text-align: center">
        <a href="javascript:<%=ajaxFunctionName %>('<%=id%>',1)"> 首页 </a>
        <%
            if (pageInfo.isHasLastPage()) {
        %>
        <a href="javascript:<%=ajaxFunctionName %>('<%=id%>',<%=pageInfo.getPageIndex()-1%>)">
            上一页 </a>
        <%
            }
        %>
        <%
            if (pageInfo.isHasNexPage()) {
        %>
        <a href="javascript:<%=RequestUtil.getParameter(request, "ajaxFunction") %>
                ('<%=id%>',<%=(pageInfo.getPageIndex()+1) %>)"> 下一页 </a>
        <%
            }
        %>
        <a href="javascript:<%=RequestUtil.getParameter(request, "ajaxFunction") %>
                ('<%=id%>',<%=pageInfo.getPageCount() %>)"> 尾页 </a>
    </p>
</div>
